package com.day0908;

import java.util.Scanner;

public class Text6 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double sum = 0;
        double avg;
        String answer;
        do{
            System.out.print("请输入学生姓名：");
            String name = in.next();
            for(int i = 1; i < 6; i++){
                System.out.print("请输入5门功课中第" + i + "门的成绩：");
                int score = in.nextInt();
                sum += score;
            }
            avg = sum / 5;
            System.out.println(name + "的平均分为：" + avg);
            System.out.println("是否继续录入：（y/n）");
            answer = in.next();
        }while (answer.equals("y"));

    }

}
